use crate::db::{db_select::db_select, db_insert::db_insert};


pub async fn get_off_line_time() ->u64 {
    if let Ok(result) = db_select("offline_time").await {
        return result.value.parse::<u64>().unwrap();
    } else {
        // 默认20分钟
        return 20;
    }
}
pub async fn set_off_line_time(time: u64) {
    db_insert("offline_time", time.to_string().as_str()).await.unwrap();
}